package com.jk.smartelderlycare.controller;

import com.jk.smartelderlycare.dto.SysDynamics;
import com.jk.smartelderlycare.interfaces.SysDynamicsServiceApi;
import com.jk.smartelderlycare.pojo.PagedResponse;
import com.jk.smartelderlycare.service.SysDynamicsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author hhk
 * @version 1.0
 * @ClassName SysDynamicsController
 * @program: smart-elderly-care
 * @description: TODO
 * @date 2024/11/19 20:34
 */
@Slf4j
@RestController
public class SysDynamicsController implements SysDynamicsServiceApi {
    
    @Autowired
    private SysDynamicsService sysDynamicsService;
    /** 
     * @description: 查询
     * @param: [sysDynamics, pageNum, pageSize]
     * @return: com.jk.smartelderlycare.pojo.PagedResponse<com.jk.smartelderlycare.dto.SysDynamics>
     * @author hhk
     * @date: 2024/11/19 20:35
     */ 
    @Override
    public PagedResponse<SysDynamics> findSysDynamicsPaginationList(SysDynamics sysDynamics, Integer pageNum, Integer pageSize) {
        return sysDynamicsService.findSysDynamicsPaginationList(sysDynamics,pageNum,pageSize);
    }
    /** 
     * @description: 新增
     * @param: [sysDynamics]
     * @return: void
     * @author hhk
     * @date: 2024/11/19 20:35
     */ 
    @Override
    public void addSysDynamics(SysDynamics sysDynamics) {
        sysDynamicsService.addSysDynamics(sysDynamics);
    }
    /** 
     * @description: 根据id删除一条
     * @param: [dynamicsId]
     * @return: void
     * @author hhk
     * @date: 2024/11/19 20:35
     */ 
    @Override
    public void deleteSysDynamicsById(Long dynamicsId) {
        sysDynamicsService.deleteSysDynamicsById(dynamicsId);
    }
    /** 
     * @description: 根据id回显一条
     * @param: [dynamicsId]
     * @return: com.jk.smartelderlycare.dto.SysDynamics
     * @author hhk
     * @date: 2024/11/19 20:36
     */ 
    @Override
    public SysDynamics findSysDynamicsById(Long dynamicsId) {
        return sysDynamicsService.findSysDynamicsById(dynamicsId);
    }
    /** 
     * @description: 修改
     * @param: [sysDynamics]
     * @return: void
     * @author hhk
     * @date: 2024/11/19 20:36
     */ 
    @Override
    public void updateSysDynamics(SysDynamics sysDynamics) {
        sysDynamicsService.updateSysDynamics(sysDynamics);
    }
    /**
     * @description: 状态修改
     * @param: [sysDynamics]
     * @return: void
     * @author hhk
     * @date: 2024/11/19 20:36
     */
    @Override
    public void updateStatusById(SysDynamics sysDynamics) {
        sysDynamicsService.updateStatusById(sysDynamics);
    }
    /**
     * @description: 批量删除
     * @param: [ids]
     * @return: void
     * @author hhk
     * @date: 2024/11/19 20:37
     */
    @Override
    public void deleteSysDynamicsByIds(List<Long> ids) {
        sysDynamicsService.deleteSysDynamicsByIds(ids);
    }
}
